﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 人脸设备基础输入参数
    /// </summary>
    public class DeviceBaseInput
    {
        /// <summary>
        /// 名称
        /// </summary>
        public virtual string Name { get; set; }
        
        /// <summary>
        /// 客户端设备号
        /// </summary>
        public virtual string ClientSn { get; set; }
        
        /// <summary>
        /// 通行方向
        /// </summary>
        public virtual DirectionType Direction { get; set; }
        
        /// <summary>
        /// 项目ID
        /// </summary>
        public virtual long ProjectId { get; set; }
        
        /// <summary>
        /// 通信方式
        /// </summary>
        public virtual ConnectType DeviceConnect { get; set; }
        
        /// <summary>
        /// 设备型号
        /// </summary>
        public virtual ModelType DeviceModel { get; set; }
        
        /// <summary>
        /// 是否允许下发人员到设备
        /// </summary>
        public virtual bool EnableEmpSend { get; set; }
        
        /// <summary>
        /// 是否接收通行记录
        /// </summary>
        public virtual bool EnableRecLog { get; set; }
        
        /// <summary>
        /// 是否上传通行记录
        /// </summary>
        public virtual bool EnableUploadLog { get; set; }
        
        /// <summary>
        /// 是否保存不匹配通行记录
        /// </summary>
        public virtual bool EnableRecNotMatchUploadLog { get; set; }
        
        /// <summary>
        /// 客户端在线
        /// </summary>
        public virtual bool IsOnline { get; set; }
        
        /// <summary>
        /// 服务端在线
        /// </summary>
        public virtual bool IsOnlineServer { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        public virtual StatusEnum Status { get; set; }
        
        /// <summary>
        /// 租户Id
        /// </summary>
        public virtual long? TenantId { get; set; }
        
        /// <summary>
        /// 创建者部门Id
        /// </summary>
        public virtual long? CreateOrgId { get; set; }
        
        /// <summary>
        /// 创建者部门名称
        /// </summary>
        public virtual string? CreateOrgName { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }
        
        /// <summary>
        /// 是否拉取人员信息
        /// </summary>
        public virtual bool EnableGetEmpInfo { get; set; }
        
    }

    /// <summary>
    /// 人脸设备分页查询输入参数
    /// </summary>
    public class PageDeviceInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string? Name { get; set; }
        
        /// <summary>
        /// 客户端设备号
        /// </summary>
        public string? ClientSn { get; set; }
        
        /// <summary>
        /// 通行方向
        /// </summary>
        public DirectionType? Direction { get; set; }
        
        /// <summary>
        /// 项目ID
        /// </summary>
        public long? ProjectId { get; set; }
        
        /// <summary>
        /// 通信方式
        /// </summary>
        public ConnectType? DeviceConnect { get; set; }
        
        /// <summary>
        /// 设备型号
        /// </summary>
        public ModelType? DeviceModel { get; set; }
        
        /// <summary>
        /// 是否允许下发人员到设备
        /// </summary>
        public bool? EnableEmpSend { get; set; }
        
        /// <summary>
        /// 是否接收通行记录
        /// </summary>
        public bool? EnableRecLog { get; set; }
        
        /// <summary>
        /// 是否上传通行记录
        /// </summary>
        public bool? EnableUploadLog { get; set; }
        
        /// <summary>
        /// 是否保存不匹配通行记录
        /// </summary>
        public bool? EnableRecNotMatchUploadLog { get; set; }
        
        /// <summary>
        /// 客户端在线
        /// </summary>
        public bool? IsOnline { get; set; }
        
        /// <summary>
        /// 服务端在线
        /// </summary>
        public bool? IsOnlineServer { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        public StatusEnum? Status { get; set; }
        
        /// <summary>
        /// 是否拉取人员信息
        /// </summary>
        public bool? EnableGetEmpInfo { get; set; }
        
    }

    /// <summary>
    /// 人脸设备增加输入参数
    /// </summary>
    public class AddDeviceInput : DeviceBaseInput
    {
        /// <summary>
        /// 名称
        /// </summary>
        [Required(ErrorMessage = "名称不能为空")]
        public override string Name { get; set; }
        
        /// <summary>
        /// 客户端设备号
        /// </summary>
        [Required(ErrorMessage = "客户端设备号不能为空")]
        public override string ClientSn { get; set; }
        
        /// <summary>
        /// 通行方向
        /// </summary>
        [Required(ErrorMessage = "通行方向不能为空")]
        public override DirectionType Direction { get; set; }
        
        /// <summary>
        /// 项目ID
        /// </summary>
        [Required(ErrorMessage = "项目ID不能为空")]
        public override long ProjectId { get; set; }
        
        /// <summary>
        /// 通信方式
        /// </summary>
        [Required(ErrorMessage = "通信方式不能为空")]
        public override ConnectType DeviceConnect { get; set; }
        
        /// <summary>
        /// 设备型号
        /// </summary>
        [Required(ErrorMessage = "设备型号不能为空")]
        public override ModelType DeviceModel { get; set; }
        
        /// <summary>
        /// 是否允许下发人员到设备
        /// </summary>
        [Required(ErrorMessage = "是否允许下发人员到设备不能为空")]
        public override bool EnableEmpSend { get; set; }
        
        /// <summary>
        /// 是否接收通行记录
        /// </summary>
        [Required(ErrorMessage = "是否接收通行记录不能为空")]
        public override bool EnableRecLog { get; set; }
        
        /// <summary>
        /// 是否上传通行记录
        /// </summary>
        [Required(ErrorMessage = "是否上传通行记录不能为空")]
        public override bool EnableUploadLog { get; set; }
        
        /// <summary>
        /// 是否保存不匹配通行记录
        /// </summary>
        [Required(ErrorMessage = "是否保存不匹配通行记录不能为空")]
        public override bool EnableRecNotMatchUploadLog { get; set; }
        
        /// <summary>
        /// 客户端在线
        /// </summary>
        [Required(ErrorMessage = "客户端在线不能为空")]
        public override bool IsOnline { get; set; }
        
        /// <summary>
        /// 服务端在线
        /// </summary>
        [Required(ErrorMessage = "服务端在线不能为空")]
        public override bool IsOnlineServer { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        [Required(ErrorMessage = "状态不能为空")]
        public override StatusEnum Status { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
        /// <summary>
        /// 是否拉取人员信息
        /// </summary>
        [Required(ErrorMessage = "是否拉取人员信息不能为空")]
        public override bool EnableGetEmpInfo { get; set; }
        
    }

    /// <summary>
    /// 人脸设备删除输入参数
    /// </summary>
    public class DeleteDeviceInput : BaseIdInput
    {
    }

    /// <summary>
    /// 人脸设备更新输入参数
    /// </summary>
    public class UpdateDeviceInput : DeviceBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 人脸设备主键查询输入参数
    /// </summary>
    public class QueryByIdDeviceInput : DeleteDeviceInput
    {

    }
